package site.xying.dd;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

/**
 * @author: Hisen
 * @date: 2019/2/1 13:06
 * @description:
 */
public class AllCommand implements CommandExecutor{
  private Config config;

  AllCommand(Config config){
    this.config = config;
  }

  @Override
  public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    if(label.equalsIgnoreCase(Const.Command.DD.getCmd())) {
      if (args[0].equalsIgnoreCase(Const.Command.RELOAD.getCmd())) {
        config.init();
        sender.sendMessage("DeathDrop 插件已经重新加载。");
        return true;
      }
    }
    return false;
  }
}
